﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HeqinSjsc2024.Class.DingApi.Response
{
    /// <summary>
    /// 钉钉API返回基类
    /// </summary>
    /// <remarks>
    /// IT部:王韵顺
    /// </remarks>
    internal class DingResponse
    {
        [JsonProperty("errcode")]
        public long Errcode { get; set; }

        [JsonProperty("errmsg")]
        public string Errmsg { get; set; }

        [JsonProperty("request_id")]
        public string RequestId { get; set; }
    }
    #region DingResListSub 得到子部门类定义
    public partial class ListSubResult
    {

        [JsonProperty("auto_add_user")]
        public bool AutoAddUser { get; set; }

        [JsonProperty("create_dept_group")]
        public bool CreateDeptGroup { get; set; }

        [JsonProperty("dept_id")]
        public long DeptId { get; set; }

        [JsonProperty("name")]
        public string Name { get; set; }

        [JsonProperty("parent_id")]
        public long ParentId { get; set; }
    }

    internal class DingResListSubID : DingResponse
    {
        [JsonProperty("result")]
        public List<ListSubResult> Result { get; set; }


    }
    
    

    #endregion
}
